A tape library device (LIB: Library) that includes multiple storage media using magnetic tapes has been used in a wide variety of applications in which mass storage is desired for data backup to a host such as a server, or for other purposes. On the one hand, a magnetic tape has an advantage of being low-cost and having large storage capacity, but on the other hand the magnetic tape allows slower data access speed than a hard disk drive (HDD) or the like. For this reason, in recent years, there has been used a hierarchical storage system in which a disk array device including multiple HDDs is used as a cache mechanism (primary storage), and a tape library device of larger capacity is provided in a back-end (secondary storage). In some cases, the hierarchical storage system may be referred to as a virtual tape library. In addition, a disk array device may be referred to as a tape volume cache (TVC), and a tape medium may be referred to as a physical volume (PV).
Such a hierarchical storage system has a hierarchy control server configured to control a disk array device or a tape library device. For example, when there is a data read or write request from a host, the hierarchy control server behaves to the host as a conventional tape library device, but internally performs reading and writing of data by using the disk array device. In this process, the hierarchy control server performs reading and writing on the disk array device by treating, as one logical volume (LV), a set of data acquired from each host. Then, in the background, the hierarchy control server saves the data written to the disk array device in a tape medium without having an intervention by the host. Specifically, the hierarchy control server saves the logical volume stored in the disk array device into a physical volume, namely, a tape medium. This process to store a logical volume in the disk array device into a physical volume may be referred to as “migration” in some cases.
In order to relieve a situation where the capacity of the disk array device is largely occupied by physical volumes stored therein, the hierarchical storage system erases large-capacity physical volumes that have not been updated and have been already migrated.
In addition, the hierarchical storage system has a technique to generate and manage a group called Stacked PVG (physical volume group) from used physical volumes in which logical volumes are already stored. The hierarchical storage system further has a technique to generate and manage a group named Scratch PVG from unused physical volumes in which no data is stored.
Here, operation of the hierarchical storage system in migration is described in detail. A state of a logical volume which is to be read and written by the host on the disk array device and which is already stored in the disk array device may be referred to as on cache. In addition, a state of a logical volume which is to be read and written by the host on the disk array device but is not yet stored in the disk array device may be referred to as cache miss. When a logical volume to be read and written by the host is on cache, the hierarchy control server reads the logical volume from the disk array device and responds to the host. In contrast to this, when the logical volume to be read and written by the host is a cache miss, the hierarchy control server inserts the physical volume, to which that logical volume has been migrated, into a tape drive of the tape library device, and reads that logical volume. Then, after moving the read logical volume to the disk array device, the hierarchy control server responds to the host.
The hierarchical storage system further performs updating of a logical volume in which a new logical volume of same data is stored in a physical volume by migration. In this respect, in order to save troublesome processing such as generation management or the like, an operation may be performed that with an old logical volume prior to updating as an invalid logical volume, an area of that invalid logical volume is made an invalid area. In this case, every time a logical volume is updated, an invalid area in a physical volume increases, thus reducing a usable area in the physical volume. Then, when a logical volume may no longer be stored in the physical volume, an unused physical volume is newly used. For example, when Stacked PVG and Scratch PVG are used, a physical volume to be used is moved from the Scratch PVG to the Stacked PVG if the Stacked PVG has no physical volume that may store a logical volume. Consequently, at last, the number of unused physical volumes is also reduced.
Thus, as a conventional technique to increase the number of unused physical volumes, there is a technique called reorganization as described below. In the reorganization, when the number of remaining unused physical volumes is small in the tape library device, logical volumes are moved from a used physical volume to an unused physical volume in order to increase the number of unused physical volumes. Then, the used physical volume from which stored logical volume has been moved becomes an unused physical volume. When the Stacked PVG and the Scratch PVG are used, unused physical volumes generated by the reorganization are returned to the Scratch PVG.
In addition, as a reorganization technique, there is a conventional technique to determine an area of invalid data from information on offset or length or the like related to stored data and move data. There is another conventional technique to execute reorganization in an optical library device. In addition, there is a conventional technique to select as a migration destination tape a tape which stores the most valid data corresponding to invalid data stored in a migration source tape, when data is migrated.
Related techniques are disclosed in, for example, Japanese National Publication of International Patent Application No. 2010-522914, Japanese Laid-open Patent Publication No. 2002-297431, and Japanese Laid-open Patent Publication No. 2008-146408.
However, it is possible in the conventional hierarchical storage system that there are not enough unused physical volumes in executing reorganization, thus making it difficult to reserve sufficient physical volumes in Scratch PVG. In such a case, a reorganization process is difficult to perform. Consequently, migration of logical volumes stored in a disk array device to physical volumes fails, thus making it difficult to maintain data redundancy in a virtual tape device.
In addition, when the conventional technique to determine an invalid data area from information related to stored data is used, it is difficult to avoid depletion of unused physical volumes although optimization of reorganization may be implemented. This is also true even when the conventional reorganization technique in an optical library device or the conventional technique to select a migration destination based on a relation with invalid data in a migration source is used.